package com.wedimob.slideshare.bo;

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import com.wedimob.slideshare.Factory;
import com.wedimob.slideshare.parser.annotation.HTMLMapping;
import com.wedimob.slideshare.parser.annotation.HTMLMappings;
import com.wedimob.slideshare.source.SlideShareStrategy;

@HTMLMappings(
        mappings =
        {
                @HTMLMapping(url = SlideShareStrategy.SEARCH_PATTERN, tag = "li.clearfix"),
                @HTMLMapping(url = SlideShareStrategy.USER_DOC_PAGE_PATTERN, tag = "a[data-hits]"),
        })
public class Summaries extends Container<Summary> {

    /**
	 * 
	 */
    private static final long serialVersionUID = 8624135865760879957L;

    public static void main(String[] args) throws IOException {
        Document doc = Jsoup.connect("http://fr.slideshare.net/search/slideshow?searchfrom=header&q=illuminati")
                .timeout(60000).get();
        Summaries summaries = Factory.fromDocument(doc, Summaries.class, null);
        System.out.println(summaries);
    }
}
